Skip to content

docs: update aztec.js guides for new send API#20062

Merged
AztecBot merged 1 commit intonextfrom
josh/ecodr-727-miscellaneous-docs-updates
Feb 3, 2026
Merged

docs: update aztec.js guides for new send API#20062
AztecBot merged 1 commit intonextfrom
josh/ecodr-727-miscellaneous-docs-updates

Conversation

@critesjosh
Copy link
Contributor

@critesjosh critesjosh commented Jan 29, 2026

Summary

Comprehensive documentation updates for aztec.js guides and related developer documentation.

API Updates (from #19778)

  • Remove .wait() calls - send() now returns receipt directly
  • Remove .deployed() calls - send() returns contract for deployments
  • Add NO_WAIT option and waitForTx utility examples
  • Update getTxReceipt to use node instead of wallet

Type-Checked Examples

  • Add runnable TypeScript examples in docs/examples/ts/ for:
    • aztecjs_connection - Connection and account creation examples
    • aztecjs_advanced - skip_initialization and poll_for_events examples
    • aztecjs_authwit - Authorization witness examples
    • aztecjs_testing - Testing examples
  • Examples are validated with config.yaml files for CI integration

Documentation Improvements

  • Add note explaining TestWallet vs production wallets in account creation guide
  • Clarify undeclared variables in code examples
  • Format code blocks for consistency
  • Update devnetTag version reference

Bug Fixes

  • Update installation commands to use -L flag for curl (follows redirects)

Files updated:

  • how_to_send_transaction.md
  • how_to_deploy_contract.md
  • how_to_create_account.md
  • how_to_pay_fees.md
  • how_to_use_authwit.md
  • how_to_test.md
  • how_to_read_data.md
  • how_to_connect_to_local_network.md
  • Various versioned docs with curl -L fix

Test plan

  • Verify documentation builds successfully
  • Review code examples for accuracy against new API
  • Run type-checked examples to verify they compile

🤖 Generated with Claude Code

Copy link
Contributor

@sklppy88 sklppy88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think eventually moving all these examples to include codes would be good tbh

@critesjosh critesjosh force-pushed the josh/ecodr-727-miscellaneous-docs-updates branch from 9a6082c to 04b195a Compare February 2, 2026 14:15
@critesjosh critesjosh marked this pull request as ready for review February 2, 2026 17:24
@critesjosh critesjosh requested a review from a team as a code owner February 2, 2026 17:24
Copy link
Contributor

@sklppy88 sklppy88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. But things reused can also reuse the same include code ?

@AztecBot
Copy link
Collaborator

AztecBot commented Feb 3, 2026

⚠️ Docs Examples Validation Failed

TypeScript validation

(truncated)...
leted
aztecjs_connection	�[94m➤�[39m �[90mYN0000�[39m: ┌ Link step
aztecjs_authwit	�[94m➤�[39m �[90mYN0000�[39m: ┌ Link step
aztecjs_advanced	�[93m➤�[39m �]8;;https://yarnpkg.com/advanced/error-codes#yn0072---nm_preserve_symlinks_required�YN0072�]8;;�: │ The application uses portals and that's why �[96m--preserve-symlinks�[39m Node option is required for launching it
aztecjs_advanced	�[94m➤�[39m �[90mYN0000�[39m: └ Completed
aztecjs_getting_started	�[93m➤�[39m �]8;;https://yarnpkg.com/advanced/error-codes#yn0072---nm_preserve_symlinks_required�YN0072�]8;;�: │ The application uses portals and that's why �[96m--preserve-symlinks�[39m Node option is required for launching it
aztecjs_getting_started	�[94m➤�[39m �[90mYN0000�[39m: └ Completed
aztecjs_advanced	�[93m➤�[39m YN0000: · Done with warnings in 0s 48ms
aztecjs_getting_started	�[93m➤�[39m YN0000: · Done with warnings in 0s 47ms
aztecjs_connection	�[93m➤�[39m �]8;;https://yarnpkg.com/advanced/error-codes#yn0072---nm_preserve_symlinks_required�YN0072�]8;;�: │ The application uses portals and that's why �[96m--preserve-symlinks�[39m Node option is required for launching it
aztecjs_connection	�[94m➤�[39m �[90mYN0000�[39m: └ Completed
aztecjs_authwit	�[93m➤�[39m �]8;;https://yarnpkg.com/advanced/error-codes#yn0072---nm_preserve_symlinks_required�YN0072�]8;;�: │ The application uses portals and that's why �[96m--preserve-symlinks�[39m Node option is required for launching it
aztecjs_authwit	�[94m➤�[39m �[90mYN0000�[39m: └ Completed
aztecjs_connection	�[93m➤�[39m YN0000: · Done with warnings in 0s 45ms
aztecjs_authwit	�[93m➤�[39m YN0000: · Done with warnings in 0s 46ms
aztecjs_advanced	Verifying linked packages...
aztecjs_getting_started	Verifying linked packages...
aztecjs_advanced	✓ @aztec/aztec.js: 77 .d.ts files
aztecjs_connection	Verifying linked packages...
aztecjs_getting_started	✓ @aztec/aztec.js: 77 .d.ts files
aztecjs_authwit	Verifying linked packages...
aztecjs_advanced	✓ @aztec/accounts: 27 .d.ts files
aztecjs_getting_started	✓ @aztec/accounts: 27 .d.ts files
aztecjs_connection	✓ @aztec/aztec.js: 77 .d.ts files
aztecjs_advanced	✓ @aztec/test-wallet: 8 .d.ts files
aztecjs_authwit	✓ @aztec/aztec.js: 77 .d.ts files
aztecjs_getting_started	✓ @aztec/test-wallet: 8 .d.ts files
aztecjs_connection	✓ @aztec/accounts: 27 .d.ts files
aztecjs_authwit	✓ @aztec/accounts: 27 .d.ts files
aztecjs_advanced	✓ @aztec/noir-contracts.js: 33 .d.ts files
aztecjs_getting_started	✓ @aztec/noir-contracts.js: 33 .d.ts files
aztecjs_connection	✓ @aztec/test-wallet: 8 .d.ts files
aztecjs_authwit	✓ @aztec/test-wallet: 8 .d.ts files
aztecjs_advanced	✓ @aztec/ethereum: 85 .d.ts files
aztecjs_connection	✓ @aztec/noir-contracts.js: 33 .d.ts files
aztecjs_authwit	✓ @aztec/noir-contracts.js: 33 .d.ts files
aztecjs_advanced	✓ @aztec/stdlib: 475 .d.ts files
aztecjs_advanced	Type checking 'aztecjs_advanced'...
aztecjs_authwit	Type checking 'aztecjs_authwit'...
aztecjs_getting_started	Type checking 'aztecjs_getting_started'...
aztecjs_connection	Type checking 'aztecjs_connection'...
aztecjs_getting_started	✓ 'aztecjs_getting_started' validated successfully
aztecjs_getting_started	Cleaning up temporary files for 'aztecjs_getting_started'...
aztecjs_testing	validate_project aztecjs_testing
aztecjs_authwit	✓ 'aztecjs_authwit' validated successfully
aztecjs_authwit	Cleaning up temporary files for 'aztecjs_authwit'...
aztecjs_connection	index.ts(53,60): error TS2307: Cannot find module '@aztec/stdlib/contract' or its corresponding type declarations.
bob_token_contract	validate_project bob_token_contract
aztecjs_testing	�[38;2;188;109;208m---�[0m �[38;2;95;167;241m�[1mValidating aztecjs_testing�[0m �[38;2;188;109;208m---�[0m
aztecjs_testing	No custom contracts for 'aztecjs_testing', skipping codegen...
aztecjs_testing	Setting up yarn for 'aztecjs_testing'...
aztecjs_connection	ERROR: Type checking failed for 'aztecjs_connection'
aztecjs_connection	Validation failed for 'aztecjs_connection', cleaning up...
aztecjs_advanced	index.ts(114,48): error TS2339: Property 'instance' does not exist on type 'TokenContract'.
parallel: This job failed:
validate_project aztecjs_connection
Seq	Host	Starttime	JobRuntime	Send	Receive	Exitval	Signal	Command
4	:	1770123316.699	     4.704	0	1939	0	0	validate_project aztecjs_getting_started
2	:	1770123316.693	     4.750	0	1867	0	0	validate_project aztecjs_authwit
3	:	1770123316.696	     4.805	0	2017	1	0	validate_project aztecjs_connection
ERROR: Some project(s) failed validation

Action required: Please fix the docs examples or update them to match the current API.

cc @AztecProtocol/devrel

@AztecBot AztecBot force-pushed the josh/ecodr-727-miscellaneous-docs-updates branch from 0e02091 to 81cc2df Compare February 3, 2026 13:03
@AztecBot AztecBot enabled auto-merge February 3, 2026 13:03
## Summary

Comprehensive documentation updates for aztec.js guides and related developer documentation.

### API Updates (from #19778)
- Remove `.wait()` calls - `send()` now returns receipt directly
- Remove `.deployed()` calls - `send()` returns contract for deployments
- Add `NO_WAIT` option and `waitForTx` utility examples
- Update `getTxReceipt` to use node instead of wallet

### Type-Checked Examples
- Add runnable TypeScript examples in `docs/examples/ts/` for:
  - `aztecjs_connection` - Connection and account creation examples
  - `aztecjs_advanced` - `skip_initialization` and `poll_for_events` examples
  - `aztecjs_authwit` - Authorization witness examples
  - `aztecjs_testing` - Testing examples
- Examples are validated with `config.yaml` files for CI integration

### Documentation Improvements
- Add note explaining `TestWallet` vs production wallets in account creation guide
- Clarify undeclared variables in code examples
- Format code blocks for consistency
- Update `devnetTag` version reference

### Bug Fixes
- Update installation commands to use `-L` flag for curl (follows redirects)

**Files updated:**
- `how_to_send_transaction.md`
- `how_to_deploy_contract.md`
- `how_to_create_account.md`
- `how_to_pay_fees.md`
- `how_to_use_authwit.md`
- `how_to_test.md`
- `how_to_read_data.md`
- `how_to_connect_to_local_network.md`
- Various versioned docs with curl -L fix

## Test plan
- [ ] Verify documentation builds successfully
- [ ] Review code examples for accuracy against new API
- [ ] Run type-checked examples to verify they compile

🤖 Generated with [Claude Code](https://claude.ai/code)
@AztecBot AztecBot force-pushed the josh/ecodr-727-miscellaneous-docs-updates branch from 81cc2df to 53bfb29 Compare February 3, 2026 13:06
@AztecBot AztecBot added this pull request to the merge queue Feb 3, 2026
Merged via the queue into next with commit 36dc1e4 Feb 3, 2026
17 checks passed
@AztecBot AztecBot deleted the josh/ecodr-727-miscellaneous-docs-updates branch February 3, 2026 13:42
AztecBot pushed a commit that referenced this pull request Mar 3, 2026
…amples

> **Note:** This PR is stacked on #20062 and should be merged after it.

## Summary
- Add a test runner (`aztecjs_runner`) that executes documentation examples against a live network
- Fix transfer examples to call `transfer_to_private()` before private transfers (public mint → private transfer flow)
- Add README explaining how typechecking and execution verification work for docs examples
- Integrate runner into e2e compose tests where the network is already running

## Details

The runner script (`run.sh`) executes these examples sequentially:
- `aztecjs_connection` - Basic network connection and contract deployment
- `aztecjs_getting_started` - Token minting and transfers
- `aztecjs_advanced` - Advanced patterns (batch calls, sponsored transactions, etc.)
- `aztecjs_authwit` - Authentication witnesses
- `aztecjs_testing` - Testing patterns with assertions

The runner is invoked from `docs_examples.test.ts` in the e2e compose tests, which already has a running network via docker-compose.

## Test plan
- Run `yarn workspace @aztec/end-to-end test:e2e docs_examples.test.ts` against a local network
- Verify all 5 examples pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Josh Crites <jc@joshcrites.com>
AztecBot pushed a commit that referenced this pull request Mar 3, 2026
…amples

> **Note:** This PR is stacked on #20062 and should be merged after it.

## Summary
- Add a test runner (`aztecjs_runner`) that executes documentation examples against a live network
- Fix transfer examples to call `transfer_to_private()` before private transfers (public mint → private transfer flow)
- Add README explaining how typechecking and execution verification work for docs examples
- Integrate runner into e2e compose tests where the network is already running

## Details

The runner script (`run.sh`) executes these examples sequentially:
- `aztecjs_connection` - Basic network connection and contract deployment
- `aztecjs_getting_started` - Token minting and transfers
- `aztecjs_advanced` - Advanced patterns (batch calls, sponsored transactions, etc.)
- `aztecjs_authwit` - Authentication witnesses
- `aztecjs_testing` - Testing patterns with assertions

The runner is invoked from `docs_examples.test.ts` in the e2e compose tests, which already has a running network via docker-compose.

## Test plan
- Run `yarn workspace @aztec/end-to-end test:e2e docs_examples.test.ts` against a local network
- Verify all 5 examples pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-merge-queue bot pushed a commit that referenced this pull request Mar 3, 2026
…amples (#20113)

> **Note:** This PR is stacked on #20062 and should be merged after it.

## Summary
- Add a test runner (`aztecjs_runner`) that executes documentation
examples against a live network
- Fix transfer examples to call `transfer_to_private()` before private
transfers (public mint → private transfer flow)
- Add README explaining how typechecking and execution verification work
for docs examples
- Integrate runner into e2e compose tests where the network is already
running

## Details

The runner script (`run.sh`) executes these examples sequentially:
- `aztecjs_connection` - Basic network connection and contract
deployment
- `aztecjs_getting_started` - Token minting and transfers
- `aztecjs_advanced` - Advanced patterns (batch calls, sponsored
transactions, etc.)
- `aztecjs_authwit` - Authentication witnesses
- `aztecjs_testing` - Testing patterns with assertions

The runner is invoked from `docs_examples.test.ts` in the e2e compose
tests, which already has a running network via docker-compose.

## Test plan
- Run `yarn workspace @aztec/end-to-end test:e2e docs_examples.test.ts`
against a local network
- Verify all 5 examples pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)
johnathan79717 pushed a commit that referenced this pull request Mar 4, 2026
…amples

> **Note:** This PR is stacked on #20062 and should be merged after it.

## Summary
- Add a test runner (`aztecjs_runner`) that executes documentation examples against a live network
- Fix transfer examples to call `transfer_to_private()` before private transfers (public mint → private transfer flow)
- Add README explaining how typechecking and execution verification work for docs examples
- Integrate runner into e2e compose tests where the network is already running

## Details

The runner script (`run.sh`) executes these examples sequentially:
- `aztecjs_connection` - Basic network connection and contract deployment
- `aztecjs_getting_started` - Token minting and transfers
- `aztecjs_advanced` - Advanced patterns (batch calls, sponsored transactions, etc.)
- `aztecjs_authwit` - Authentication witnesses
- `aztecjs_testing` - Testing patterns with assertions

The runner is invoked from `docs_examples.test.ts` in the e2e compose tests, which already has a running network via docker-compose.

## Test plan
- Run `yarn workspace @aztec/end-to-end test:e2e docs_examples.test.ts` against a local network
- Verify all 5 examples pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants